home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3477 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.2 KB

  1. Path: mail2news.demon.co.uk!etchq.demon.co.uk
  2. From: MushyPea <MushyPea@etchq.demon.co.uk>
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Filtering stdio before passing to a program
  5. Date: Tue, 20 Feb 96 18:09:51 GMT
  6. Message-ID: <9602201809.AA0024f@etchq.demon.co.uk>
  7. X-NNTP-Posting-Host: etchq.demon.co.uk
  8. X-Newsreader: ADMaN 1.7 Copyright 1995 S.T.Brown
  9. X-Mail2News-Path: disperse.demon.co.uk!post.demon.co.uk!etchq.demon.co.uk
  10.  
  11. Hi there, ppl,
  12.  
  13. Problem:
  14. ~~~~~~~~
  15. I have a program, written for the Amiga, that uses stdio.  It *insists* that
  16. all lines are terminated with only a line feed, and not a carriage return -
  17. which is not a problem if the program is only being run on an Amiga, but I
  18. actually want to run this program as a telnet session from a remote computer,
  19. ie. the remote computer is running the program on my Amiga and all i/o
  20. happens at their end.  However, every other computer out there seems to send
  21. the CR+LF combination at the end of the line, which upsets the program I am
  22. trying to run.
  23.  
  24. Solution?:
  25. ~~~~~~~~~~
  26. What I'd like to do is run a utility that takes information from it's own
  27. stdin, filters out the CR codes, and passes the input on to my other
  28. program's stdin.  Also, the stdout from the other program would need to be
  29. passed through to the stdout of the utility. (with CR's added back in?)
  30.  
  31. Other uses:
  32. ~~~~~~~~~~~
  33. I guess that a similar program could be used to add macros or abbreviations
  34. to any other program that utilises stdio...
  35.  
  36. What I'd like:
  37. ~~~~~~~~~~~~~~
  38. Firstly, I'd like suggestions on how to go about writing a program that does
  39. this, since I'd enjoy the challenge of writing it myself - assembler only,
  40. please!
  41.  
  42. Secondly, I'd like any source code that performs the same function, again, in
  43. assembler please.
  44.  
  45. Lastly, if there is already a utility out there that does this (*I* can't
  46. find one), then let me know where it is.
  47.  
  48.  
  49.  
  50.  
  51. I'd be really grateful for any ideas on this one...
  52.  
  53.  
  54.  
  55. Thanks in advance.
  56.  
  57. -- 
  58. MushyPea/EtCetera (Ian Marsh) [680x0 coder, musician]       ___MMM___
  59. Internet: MushyPea@etchq.demon.co.uk (EtCetera HQ)            (O O)
  60. A1200 030-50MHz 2Mb+8Mb SCSI-II 1700MbHD 3xCD 28800Vfc ---oOO--(_)--OOo---
  61. KS3.0 / AmiTCP v4.0 / GoldED v3 / PGP v2.6ui / ADMaN v1.7
  62.